//
//  UserViewModel.m
//  DebugDemo
//
//  Created by XFB on 2019/1/7.
//  Copyright © 2019年 ZhouCheng. All rights reserved.
//

#import "UserViewModel.h"
#import "UserInfo.h"

@implementation UserViewModel

- (instancetype)initWithUserName:(NSString *)userName
                          userID:(NSInteger)userID
                             age:(NSInteger)age
{
    self = [super init];
    if (!self) return nil;
    
    _userInfo = [[UserInfo alloc] initWithUserName:userName userID:userID age:age];
    if (_userInfo.userName.length > 0) {
        _userName = _userInfo.userName;
    } else {
        _userName = @"@Fearless@";
    }
    return self;
}

@end
